<?php 
$object=$this->object;
defined('_JEXEC') or die('Restricted access');
AdminUIHelper::startAdminArea ();
$acid=$this->acid;
?>
<script type="text/javascript">
function limiter(){
	// check can bo blank
	var name= document.adminForm.sn_idcanbo.value;
	if(name=="0") document.getElementById('loicanbo').innerHTML="(!)  Select one.!";
	else  document.getElementById('loicanbo').innerHTML="";
	// check can bo blank
	var name= document.adminForm.sn_idloaisunghiep.value;
	if(name=="0") document.getElementById('loiloaisunghiep').innerHTML="(!)  Select one.!";
	else  document.getElementById('loiloaisunghiep').innerHTML="";
	// check tieu de blank
	var name= document.adminForm.sn_tieude.value;
	if(name=="") document.getElementById('loitieude').innerHTML="(!)  Not blank.!";
	else  document.getElementById('loitieude').innerHTML="";
	// check bat dau blank
	var diachi= document.adminForm.sn_batdau.value;
	if(diachi=="") document.getElementById('loibatdau').innerHTML="(!) Not blank.!";
	else  document.getElementById('loibatdau').innerHTML="";
	// check dia diem
	var diachi= document.adminForm.sn_diadiem.value;
	if(diachi=="") document.getElementById('loidiadiem').innerHTML="(!) Not blank.!";
	else  document.getElementById('loidiadiem').innerHTML="";
	// check ket thuc
	var diachi= document.adminForm.sn_ketthuc.value;
	if(diachi=="") document.getElementById('loiketthuc').innerHTML="(!) Not blank.!";
	else  document.getElementById('loiketthuc').innerHTML="";
	// check tinh trang
	var diachi= document.adminForm.sn_tinhtrang.value;
	if(diachi=="") document.getElementById('loitinhtrang').innerHTML="(!) Not blank.!";
	else  document.getElementById('loitinhtrang').innerHTML="";
	// check sn_thanhtich
	var diachi= document.adminForm.sn_thanhtich.value;
	if(diachi=="") document.getElementById('loithanhtich').innerHTML="(!) Not blank.!";
	else  document.getElementById('loithanhtich').innerHTML="";
	// check sn_mieuta
	var diachi= document.adminForm.sn_mieuta.value;
	if(diachi=="") document.getElementById('loimieuta').innerHTML="(!) Not blank.!";
	else  document.getElementById('loimieuta').innerHTML="";
			}
</script>
<form name="adminForm" enctype="multipart/form-data" method="post"  onmousemove="limiter()" >
	<input type='hidden' name='task' />
	<input type='hidden' name='add_edit' value='true' />
	<input type='hidden' name='id' value='<?php echo $this->id?>' />
	<input type='hidden' name='sn_id' value='<?php echo $this->id?>' />
	<fieldset>
		<legend><?php echo JText::_('Chi tiết cột mốc sự nghiệp')?></legend>
		<table class="admintable">
		<?php if($acid==0){ ?>
			<tr>
				<td class="key"><?php echo JText::_('Đơn vị')?></td>
				<td>
					<?php echo $this->list['donvi']; ?>
				</td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_('Phòng ban')?></td>
				<td>
					<?php echo $this->list['phongban']; ?>
				</td>
			</tr>
			<tr>
				<td class="key">
				<?php echo JText::_('Cán bộ')?>
				</td>
				<td>
					<?php echo $this->list['canbo']; ?>
					<b style="color:red;text-align:center;" id="loicanbo"  ></b>
				</td>
			</tr>
			<?php } else { ?>
						<tr>
				<td class="key">
				<?php echo JText::_('Cán bộ')?>
				</td>
				<td>
				   <input type="hidden" name="sn_idcanbo" value="<?php echo $object->sn_idcanbo; ?>">
					<input type="text" name="idcanbo" value="<?php echo $object->cb_ten; ?>" style="width:250px;" disabled="disabled"> 
					<b style="color:red;text-align:center;" id="loicanbo"  ></b>
				</td>
			</tr>
			<?php }?>
			<tr>
				<td class="key">
				<?php echo JText::_('Loại sự nghiệp')?>
				</td>
				<td>
					<?php echo $this->list['loaisunghiep']; ?>
					<b style="color:red;text-align:center;" id="loiloaisunghiep"  ></b>
				</td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_('Tiêu đề')?></td>
				<td>
				<?php echo '<textarea onkeyup="limiter()" name="sn_tieude" rows="2" cols="50" >'.$object->sn_tieude.'</textarea>';?>
					<b style="color:red;text-align:center;" id="loitieude"  ></b>
				</td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_('Bắt đầu')?></td>
				<td>
					<?php echo JHtml::calendar($object->sn_batdau, 'sn_batdau', 'sn_batdau'); ?>
					<b style="color:red;text-align:center;" id="loibatdau"  ></b>
				</td>
			</tr>
			<tr>
				<td class="key"><?php echo JText::_('Kết thúc')?></td>
				<td>
					<?php echo JHtml::calendar($object->sn_ketthuc, 'sn_ketthuc', 'sn_ketthuc'); ?>
					<b style="color:red;text-align:center;" id="loiketthuc"  ></b>
				</td>
			</tr>
						<tr>
				<td class="key"><?php echo JText::_('Địa điểm')?></td>
				<td>
				<?php echo '<textarea onkeyup="limiter()" name="sn_diadiem" rows="2" cols="50" >'.$object->sn_diadiem.'</textarea>';?>
					<b style="color:red;text-align:center;" id="loidiadiem"  ></b>
				</td>
			</tr>
						<tr>
				<td class="key"><?php echo JText::_('Tình trạng')?></td>
				<td>
				<?php echo '<textarea onkeyup="limiter()" name="sn_tinhtrang" rows="2" cols="50" >'.$object->sn_tinhtrang.'</textarea>';?>
					<b style="color:red;text-align:center;" id="loitinhtrang"  ></b>
				</td>
			</tr>
						<tr>
				<td class="key"><?php echo JText::_('Thành tích')?></td>
				<td>
				<?php echo '<textarea onkeyup="limiter()" name="sn_thanhtich" rows="2" cols="50" >'.$object->sn_thanhtich.'</textarea>';?>
					<b style="color:red;text-align:center;" id="loithanhtich"  ></b>
				</td>
			</tr>
						<tr>
				<td class="key"><?php echo JText::_('Miêu tả')?></td>
				<td>
				<?php echo '<textarea onkeyup="limiter()" name="sn_mieuta" rows="10" cols="50" >'.$object->sn_mieuta.'</textarea>';?>
					<b style="color:red;text-align:center;" id="loimieuta"  ></b>
				</td>
			</tr>
		</table>
	</fieldset>
</form>